package com.hs.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hs.server.domain.ShItemconfig;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ShItemConfigMapper extends BaseMapper<ShItemconfig> {
    @Select("SELECT id,zpfl,zplb,zpzl,shxdm,shxmc,jyx,shlb,jyw FROM sh_itemconfig")
    List<ShItemconfig> GetItems();

    @Select("SELECT shxdm FROM sh_itemconfig WHERE zpzl = #{zpzl}")
    List<String> getShxdmList(String zpzl);

    @Select("SELECT DISTINCT zplb FROM `sh_itemconfig` WHERE zpzl = #{zpzl} AND shxdm is not null")
    String getZplb(String zpzl);

    @Select("SELECT DISTINCT CONCAT('[',shxmc,'-',jyx,']') FROM sh_itemconfig WHERE shxdm = #{jyx}")
    String getZhJyx(String jyx);
}
